home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-06 | 2.5 KB | 89 lines | [TEXT/KAHL] |
- // -----------------------------------------------------------------------------
- // File : demoShell.h
- // Date : October 14, 1994
- // Author : Jim Stout
- // Purpose : function prototypes and #define's for demoShell.c
- // :
- // -----------------------------------------------------------------------------
-
- // Function prototypes
-
- void initToolbox ( void );
- void getEvents ( void );
- WindowPtr doNewWindow (void);
- void doCloseWindow (WindowPtr theWindow);
-
- // Event handling routines
-
- void doProcessEvents ( EventRecord *thisEvent );
- void doPeriodicEvent ( EventRecord *thisEvent );
- void doActivate ( EventRecord *thisEvent );
- void doDiskInsert ( EventRecord *thisEvent );
- void doKeyPress ( EventRecord *thisEvent );
- void doMouseDown ( EventRecord *thisEvent );
- void doContentClick ( EventRecord *thisEvent, WindowPtr theWindow);
- void doOSEvent ( EventRecord *thisEvent );
- void doUpdate ( EventRecord *thisEvent );
- void doMenuCommand ( long menuResult );
- void adjustMenus ( void );
- void disableMenus (Boolean disable);
-
-
- // Utility routines
-
- void closeAnyWindow ( WindowPtr window );
- Boolean isAppWindow ( WindowPtr window );
- Boolean isDAWindow ( WindowPtr window );
- Boolean isDialogWindow ( WindowPtr window );
- void invalidateScrollbars (WindowPtr theWindow);
- void doAlert ( short errorNumber, Boolean exit );
-
- // a couple of handy macro definitions
-
- #define HIWORD(longParam) (((longParam) >> 16) & 0xFFFF)
- #define LOWORD(longParam) ((longParam) & 0xFFFF)
- #define MIN(a, b) ((a) < (b) ? (a) : (b) )
-
- // Some resource ids etc.
-
- #define kNewWindowID 128
- #define rMiscStrings 129
- #define sUntitledTitle 1
- #define NIL 0L
- #define MAXLONG 0x7FFFFFFF
-
-
- #define rAboutAlert 257 // about alert
- #define rErrorAlert 258 // error user alert
-
- #define rErrorStrings 128
- #define errNeedMacPlus 1
- #define errNeedSys6 2
- #define errNeedMultiF 3
- #define errBadRsrc 4
-
- #define rMenuBar 128 // application's menu bar
-
- #define mApple 128 // Apple menu
- #define iAbout 1
-
- #define mFile 129 // File menu
- #define iClose 1
- #define iQuit 2
-
- #define mEdit 130 // Edit menu
- #define iUndo 1
- #define iLine21 2
- #define iCut 3
- #define iCopy 4
- #define iPaste 5
- #define iClear 6
-
- #define mDemo 131 // Demo menu
- #define iDemoWind 1
- #define iDemoDlog 2
- #define iComparePopup 3
- #define iDemoTab1 4
- #define iDemoTab2 5
- #define iDemoTab3 6
- #define iDemoTab4 7